package com.simtop.service.impl;

import com.simtop.dao.KsDao;
import com.simtop.pojo.userpo.User;
import com.simtop.service.KsServer;
import com.simtop.vo.ksvo.Ksvo;
import com.simtop.vo.ksvo.Ksvos;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @ClassName: KsServerImpl
 * @Description TODO
 * @Author liuzhaobo
 * @Date 2022/10/21 0021 19:30
 * @Version 1.0
 **/
@Service
public class KsServerImpl implements KsServer {

    @Autowired
   private KsDao ksDao;


    @Override
    public void deleteinsertStuExamSj(Integer ids, Integer examId, Integer sjId) {
        ksDao.deleteinsertStuExamSj(ids , examId , sjId);
    }

    @Override
    public void createStuExam(Ksvo ksvo) {
         ksDao.createStuExam(ksvo);
    }

    @Override
    public List<Ksvos> finAllOne(String op, String px , String examName) {
        return ksDao.finAllOne(op , px , examName);
    }

    @Override
    public List<Ksvos> finAllTwo(String op, String px, Integer id , String examName) {
        return ksDao.finAllTwo(op , px , id , examName);
    }

    @Override
    public void insertStuExamSj(Integer ids, Integer examId, Integer sjId, String optionAnswer) {
         ksDao.insertStuExamSj(ids , examId , sjId  , optionAnswer);
    }

    @Override
    public void deleteStuExam(Integer stuexamId) {
        ksDao.deleteStuExam(stuexamId);
    }

    @Override
    public void insertLastStuExamSj(Integer stuexamId) {
        ksDao.insertLastStuExamSj(stuexamId);
    }

    @Override
    public List<User> finduserks(String username) {
        return ksDao.finduserks(username);
    }

    @Override
    public List<Ksvos> finduserksExam(String op, String px, Integer id) {
        return ksDao.finduserksExam(op , px , id);
    }

    @Override
    public Integer getassessMent(Integer examId) {
        return ksDao.getassessMent(examId);
    }

    @Override
    public int findkhCount(Integer id, Integer examId) {
        return ksDao.findkhCount(id , examId);
    }

    @Override
    public int findkhCount2(Integer id, Integer examId) {
        return ksDao.findkhCount2(id , examId);
    }

    @Override
    public List<Ksvo> findAllList() {
        return ksDao.findAllList();
    }

    @Override
    public void updateStatus(Integer id , Date endTime) {
        ksDao.updateStatus(id , endTime);
    }
}
